Conversation
| } | ||
|
|
||
| init { | ||
| previousPerspective = MinecraftClient.getInstance().options.perspective |
There was a problem hiding this comment.
You might as well use the mc property in Lambda
| object FreeLook : Module( | ||
| name = "FreeLook", | ||
| description = "Allows you to look around freely while moving", | ||
| defaultTags = setOf(com.lambda.module.tag.ModuleTag.RENDER, com.lambda.module.tag.ModuleTag.MOVEMENT) |
There was a problem hiding this comment.
You can import the enum instead of using the full canonical path
|
|
||
| @ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V")) | ||
| private void onUpdateSetRotationArgs(Args args) { | ||
| if (FreeLook.INSTANCE.isEnabled()) { | ||
| args.set(0, FreeLook.INSTANCE.getCamera().getYawF()); | ||
| args.set(1, FreeLook.INSTANCE.getCamera().getPitchF()); | ||
| } | ||
| } |
There was a problem hiding this comment.
Could you add a snippet of the modified method ? Check other mixins for an example
This is crucial for mixin updates on new versions
There was a problem hiding this comment.
Do you mean the original source?
There was a problem hiding this comment.
Yes, look at other mixins for an example
emyfops
left a comment
There was a problem hiding this comment.
lgtm @Avanatiker what do you think
|
Btw this merges into 1.21.5. But I think 1.21.4 is main atm? Can probably back port easily. |
1.21.5 is main |
a91d23d to
04802dc
Compare
FreeLook Module
Has some extra settings for more advanced use